﻿namespace FuiouPay {
    public class Const {
        /// <summary>
        /// 编码
        /// </summary>
        public static string charset = "GBK";

        /// <summary>
        /// 公钥
        /// </summary>
        public static string publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCBv9K+jiuHqXIehX81oyNSD2RfVn+KTPb7NRT5HDPFE35CjZJd7Fu40r0U2Cp7Eyhayv/mRS6ZqvBT/8tQqwpUExTQQBbdZjfk+efb9bF9a+uCnAg0RsuqxeJ2r/rRTsORzVLJy+4GKcv06/p6CcBc5BI1gqSKmyyNBlgfkxLYewIDAQAB";

        /// <summary>
        /// 私钥
        /// </summary>
        public static string privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJgAzD8fEvBHQTyxUEeK963mjziM"
                                         + "WG7nxpi+pDMdtWiakc6xVhhbaipLaHo4wVI92A2wr3ptGQ1/YsASEHm3m2wGOpT2vrb2Ln/S7lz1"
                                         + "ShjTKaT8U6rKgCdpQNHUuLhBQlpJer2mcYEzG/nGzcyalOCgXC/6CySiJCWJmPyR45bJAgMBAAEC"
                                         + "gYBHFfBvAKBBwIEQ2jeaDbKBIFcQcgoVa81jt5xgz178WXUg/awu3emLeBKXPh2i0YtN87hM/+J8"
                                         + "fnt3KbuMwMItCsTD72XFXLM4FgzJ4555CUCXBf5/tcKpS2xT8qV8QDr8oLKA18sQxWp8BMPrNp0e"
                                         + "pmwun/gwgxoyQrJUB5YgZQJBAOiVXHiTnc3KwvIkdOEPmlfePFnkD4zzcv2UwTlHWgCyM/L8SCAF"
                                         + "clXmSiJfKSZZS7o0kIeJJ6xe3Mf4/HSlhdMCQQCnTow+TnlEhDTPtWa+TUgzOys83Q/VLikqKmDz"
                                         + "kWJ7I12+WX6AbxxEHLD+THn0JGrlvzTEIZyCe0sjQy4LzQNzAkEAr2SjfVJkuGJlrNENSwPHMugm"
                                         + "vusbRwH3/38ET7udBdVdE6poga1Z0al+0njMwVypnNwy+eLWhkhrWmpLh3OjfQJAI3BV8JS6xzKh"
                                         + "5SVtn/3Kv19XJ0tEIUnn2lCjvLQdAixZnQpj61ydxie1rggRBQ/5vLSlvq3H8zOelNeUF1fT1QJA"
                                         + "DNo+tkHVXLY9H2kdWFoYTvuLexHAgrsnHxONOlSA5hcVLd1B3p9utOt3QeDf6x2i1lqhTH2w8gzj"
                                         + "vsnx13tWqg==";

        /// <summary>
        /// 机构号
        /// </summary>
        public static string ins_cd = "08A9999999";

        /// <summary>
        /// 商户号
        /// </summary>
        public static string mchnt_cd = "0002900F0370542";

        /// <summary>
        /// 终端号，没有统一默认填：88888888
        /// </summary>
        public static string term_id = "88888888";

        /// <summary>
        /// 终端IP
        /// </summary>
        public static string term_ip = "127.0.0.1";

        /// <summary>
        /// 异步通知
        /// </summary>
        public static string notify_url = "http://www.wrx.cn";

        public static string BaseUrl = "https://fundwx.fuiou.com/";

        /// <summary>
        /// 下单
        /// </summary>
        public static string preCreateUrl = "preCreate";

        /// <summary>
        /// 公众号/服务窗统一下单
        /// </summary>
        public static string wxPreCreateUrl = "wxPreCreate";

        /// <summary>
        /// 扫码
        /// </summary>
        public static string micropayUrl = "micropay";

        /// <summary>
        /// 查询
        /// </summary>
        public static string commonQueryUrl = "commonQuery";

        /// <summary>
        /// 退款
        /// </summary>
        public static string commonRefundUrl = "commonRefund";

        /// <summary>
        /// 撤销接口
        /// </summary>
        public static string cancelorderUrl = "cancelorder";

        /// <summary>
        /// 关闭订单
        /// </summary>
        public static string closeorderUrl = "closeorder";

        /// <summary>
        /// 服务商模式获取openid
        /// </summary>
        public static string getOpenidUrl = "oauth2/getOpenid";

        /// <summary>
        /// 微信授权码查询OPENID
        /// </summary>
        public static string auth2OpenidUrl = "auth2Openid";

        /// <summary>
        /// 历史订单查询
        /// </summary>
        public static string hisTradeQueryUrl = "hisTradeQuery";

        /// <summary>
        /// 查询退款订单
        /// </summary>
        public static string refundQueryUrl = "refundQuery";
    }

    /// <summary>
    /// 订单类型
    /// </summary>
    public class OrderType {
        /// <summary>
        /// ALIPAY(统一下单、条码支付、服务窗支付)
        /// </summary>
        public const string AliPay = "ALIPAY";

        /// <summary>
        /// WECHAT(统一下单、条码支付、公众号支付、小程序)
        /// </summary>
        public const string WeChat = "WECHAT";

        /// <summary>
        /// UNIONPAY
        /// </summary>
        public const string UnionPay = "UNIONPAY";

        /// <summary>
        /// BESTPAY(翼支付)
        /// </summary>
        public const string BestPay = "BESTPAY";

        /// <summary>
        /// WXAPP(微信 app)，关闭订单用
        /// </summary>
        public const string WxApp = "WXAPP";

        /// <summary>
        /// WXH5(微信 h5)，关闭订单用
        /// </summary>
        public const string WxH5 = "WXH5";

        /// <summary>
        /// ALIAPP(支付宝app)
        /// </summary>
        public const string AliApp = "ALIAPP";

        /// <summary>
        /// ALIH5(支付宝h5)
        /// </summary>
        public const string AliH5 = "ALIH5";
    }

    /// <summary>
    /// 支付类型
    /// </summary>
    public class TradeType {
        /// <summary>
        /// JSAPI--公众号支付
        /// </summary>
        public const string JsApi = "JSAPI";

        /// <summary>
        /// FWC--支付宝服务窗、支付宝小程序
        /// </summary>
        public const string FWC = "FWC";

        /// <summary>
        /// LETPAY-微信小程序
        /// </summary>
        public const string LetPay = "LETPAY";

        /// <summary>
        /// BESTPAY--翼支付js
        /// </summary>
        public const string BestPay = "BESTPAY";
    }
}